package com.sn.author.service.impl;

import com.alibaba.fastjson.JSON;
import com.sn.author.dao.ImportVideoMapper;
import com.sn.author.domain.entity.ImportVideo;
import com.sn.author.service.dao.VideoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author xiaom
 * @Date 2020/9/29 12:58
 * @Version 1.0.0
 * @Description <>
 **/
@Service
@Slf4j
public class VideoServiceImpl implements VideoService {

    @Resource
    private ImportVideoMapper importVideoMapper;


    @Override
    public void updateVideoLikeCnt(String url, Integer likeCnt) {
        importVideoMapper.updateLikeCntByUrl(url,likeCnt);
    }

    @Override
    public void updateVideoAttentionCnt(String url, Integer attentionCnt) {
        importVideoMapper.updateAttentionCntByUrl(url,attentionCnt);
    }

    @Override
    public void updateVideoInfoByUrl(String url, ImportVideo video) {
        importVideoMapper.updateInfoByUrl(url,video);
    }
}
